import "./subjectItem.less"
import icon from '@/assets/images/home/subject.png'
import { Button, ProgressBar } from "antd-mobile"
import { useNavigate } from "react-router-dom"
// 约束父传子的数据
interface IProp {
    data: Exam
}
export default function SubjectItem({ data }: IProp) {
    const navigate = useNavigate();
    return <div className="item">
        <div><img src={icon} alt="" /></div>
        <div className="c">
            <ul>
                <li>{data.title}</li>
                <li>0/{data.itemCount}</li>
                <li>
                    <ProgressBar percent={0} />
                </li>
            </ul>
        </div>
        <div><Button onClick={() => navigate('/select/' + data.actionCode)} color="primary" fill="solid">练习</Button></div>
    </div>
}